new MVC.Test.Controller('rename',{
	test_rename_folder: function(){
		this.Contextmenu('#/rename');
		this.next();
	},
	select_folder: function(){
		this.Click('.rename');
		this.assert(MVC.$E('RENAME_FORM_NEW_NAME'));
		this.Write(MVC.$E('RENAME_FORM_NEW_NAME'), {text: '-ED\n', callback: this.next_callback()});
		
	},
	check_new_folder : function(){
		this.assert_null(MVC.$E('RENAME_FORM_NEW_NAME'));
		this.assert_null(MVC.$E('/rename'));
		this.assert(MVC.$E('/rename-ED'));
	},
	test_rename_file: function(){
		this.Dblclick('#/renamefolder')
		this.next();
	},
	context_file : function(){
		this.Contextmenu(MVC.$E('/renamefolder/file.htm'));
		this.next();
	},
	select_file: function(){
		this.Click('.rename');
		this.assert(MVC.$E('RENAME_FORM_NEW_NAME'));
		this.Write(MVC.$E('RENAME_FORM_NEW_NAME'), {text: 'l\n', callback: this.next_callback()});
		
	},
	check_new_file : function(){
		this.assert_null(MVC.$E('RENAME_FORM_NEW_NAME'));
		this.assert_null(MVC.$E('/renamefolder/file.htm'));
		this.assert(MVC.$E('/renamefolder/file.html'));
	},
	test_cancel_rename_folder: function(){
		this.Contextmenu(MVC.$E('/renamefolder'));
		this.next();
	},
	select_folder_again: function(){
		this.Click('.rename');
		this.assert(MVC.$E('RENAME_FORM_NEW_NAME'));
		this.Write(MVC.$E('RENAME_FORM_NEW_NAME'), {text: '-ED', callback: this.next_callback()});
	},
	click_something_else: function(){
		this.Click('#/aaa')
		this.next();
	},
	check_old_folder : function(){
		this.assert_null(MVC.$E('RENAME_FORM_NEW_NAME'));
		this.assert(MVC.$E('/renamefolder'));
	}
})